#元组
tup1 =(1,2,3,4,5,6)
print(tup1)
#访问元组
print(tup1[1:3])
print(tup1[1])
print(tup1[1:])
#定义一个空元组
tup2 =()
print(tup2)
#长度
print(len(tup1))
#列表list转化为元组
a =tuple([1,2,3])
print(a)
#创建一个元素时需要加逗号
tup3=(5,)
print(tup3)
#字典
d ={"a":1,"b":2,"c":3,"d":6}
print(d)
#获取字典对应的值
print(d['a'])
#修改字典的值
d['a']=10
#添加一个值
d['e']=100
#删除字典元素
del d['a']
print(d)